//
//  MYGEmojiCell.swift
//  MYGrow
//
//  Created by 小火科技 on 2024/3/12.
//

import UIKit

class MYGEmojiCell: UICollectionViewCell {
    // MARK: - Property
    var model: MYGEmojiDetailModel? {
        didSet {
            guard let model = model else {
                return
            }
            
            emoji.sd_setImage(with: URL(string: model.image))
        }
    }
    // MARK: - init
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        configUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    // MARK: - UI
    private func configUI() {
        contentView.addSubview(emoji)
        
        emoji.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
    }
    
    // MARK: - lazy load
    private lazy var emoji: UIImageView = {
        let imgV = UIImageView()
        return imgV
    }()
}
